{{template "header_en"}}
		<title>Go Walker - Functions</title>
	</head>
		
	<body id="body" style="padding-top: 60px; font-family: Microsoft Yahei; font-size: 13px;">
		{{template "navbar_zh" .}}
		<div class="container" style="width: 1000px;">
			<div id="main_content" class="row">
				<div style="margin-left: 20px;">
	                {{template "alert_zh" .}}
					<h1>函数</h1>
					<form action="/funcs">
						<div class="input-append">
							<input autocomplete="off" class="span6" type="text" placeholder="请输入关键字" value="{{.Keyword}}" name="q">
							<button class="btn" type="submit">手气不错</button>
						</div>
					</form>

					{{if .IsFindFunc}}
					<table name="result_table" class="table table-condensed table-hover">
						<thead>
							<tr>
								<th>函数名称</th>
								<th>项目路径</th>
								<th>简介（悬浮可见完整提示）</th>
							</tr>
						</thead>

						<tbody>
							{{range .Results}}
							<tr>
								<td>{{.Name}}</td>
								<td><a href="/{{.Path}}#{{.Name}}">{{.Path}}</a></td>
								<td>{{.Doc}}</td>
							</tr>
							{{end}}
						</tbody>
					</table>

		            <script>
		                (function () {
		                    var tables = document.getElementsByName("result_table");
		                    var now = new Date();
		                    for (var n = 0; n < tables.length; n++) {
		                        var table = tables[n];
		                        var items = table.getElementsByTagName("tr");
		                        for (var i = 1; i < items.length; i++) {
	                                var s = table.rows[i].cells[1].getElementsByTagName("a")[0];
	                                if (s.innerHTML.length > 40) {
		                                s.title = s.innerHTML;
	                                    s.innerHTML = "..." + s.innerHTML.substr(s.innerHTML.length - 37);
	                                }
		                            // Limit length.
		                            s = table.rows[i].cells[2];
		                            if (s.innerHTML.length > 65) {
		                                s.title = s.innerHTML;
		                                s.innerHTML = s.innerHTML.substr(0, 65) + "...";
		                            }
		                        }
		                    }
		                })();
		            </script>
					{{else}}


					{{if .IsShowIntro}}
					<p>输入关键字即可在几十万个函数中查找。</p>
					{{else}}
					<p>未搜索到包含关键字 <b>{{.Keyword}}</b> 的函数。</p>
					{{end}}

					{{end}}
				</div>
			</div>
		</div>
		{{template "footer_zh" .}}
	</body>
</html>
